package dto;

import java.util.ArrayList;
import java.util.List;

public class TitleDTO {
	private int _id;
	private String _content;
	public List<QuestionDTO> lstQuestion;
	public List<AnswerDTO> lstAnswer;
	
	public TitleDTO() {
		this._id = 0;
		this._content = "";
		this.lstQuestion = new ArrayList<QuestionDTO>();
		this.lstAnswer = new ArrayList<AnswerDTO>();
	}
	
	public TitleDTO(TitleDTO title) {
		this._id = title._id;
		this._content = title._content;
		this.lstQuestion = new ArrayList<QuestionDTO>();
		this.lstAnswer = new ArrayList<AnswerDTO>();
	}
	
	public TitleDTO(int id, String content) {
		this._id = id;
		this._content = content;
		this.lstQuestion = new ArrayList<QuestionDTO>();
		this.lstAnswer = new ArrayList<AnswerDTO>();
	}
	
	public void update(TitleDTO title) {
		this._content = title._content;
	}
	
	public void setID(int id) {
		this._id = id;
	}
	public void setContent(String content) {
		this._content = content;
	}
	
	public int getID() {
		return this._id;
	}
	public String getContent() {
		return this._content;
	}
	public int getAnswerSize() {
		return this.lstAnswer.size();
	}
}
